<script setup lang="ts">
import { Local } from '@/utils/storage'
import { useLayoutConfigStore } from '@/store/layoutConfig'
import { ElConfigProvider } from 'element-plus'
import zhCn from "element-plus/es/locale/lang/zh-cn"

const layoutConfig = useLayoutConfigStore()
onMounted(() => {
  //获取local中的布局设置
  const layoutConfigState = Local.get('layoutConfig')

  if (layoutConfigState) {
    layoutConfig.updateState(layoutConfigState)
  }
})
const locale = zhCn;
</script>

<template>
  <div class="h100">
    <el-config-provider :locale="locale">
      <!--路由组件渲染出口 -->
      <router-view></router-view>
    </el-config-provider>
  </div>
</template>

<style scoped></style>
